package com.style_transfer.controller;

import com.style_transfer.model.Style;
import com.style_transfer.service.StyleService;
import com.style_transfer.service.impl.StyleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/style")
public class StyleController {
    @Autowired
    private StyleServiceImpl styleService;

    @ResponseBody
    @GetMapping("/getAllStyle")
    public List<Style> getAllStyle(){
        return styleService.getAllStyle();
    }
}
